﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:toolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=Epi.DataVisualization.Toolkit"                    
                    xmlns:EpiDashboard="clr-namespace:EpiDashboard"
                    xmlns:Controls="clr-namespace:EpiDashboard.Controls">
    <SolidColorBrush x:Key="invalidColor" Color="Red" />
    <SolidColorBrush x:Key="validColor" Color="Green" />
    <SolidColorBrush x:Key="normalColor" Color="Black" />
    <SolidColorBrush x:Key="gadgetBackgroundBrush" Color="#CCFFFFFF"></SolidColorBrush>
    <SolidColorBrush x:Key="gadgetBorderBrush" Color="#D5DFE5"></SolidColorBrush>
    <SolidColorBrush x:Key="columnHeaderForegroundBrush" Color="White"></SolidColorBrush>    
    <SolidColorBrush x:Key="outputBorderBrush" Color="#7BA0CD"></SolidColorBrush>
    <!--<SolidColorBrush x:Key="cellBorderBrush" Color="#7BA0CD"></SolidColorBrush>-->
    <SolidColorBrush x:Key="cellBorderBrush" Color="#DDE6F3"></SolidColorBrush>
    <SolidColorBrush x:Key="headerCellBorderBrush" Color="White"></SolidColorBrush>
    <SolidColorBrush x:Key="gadgetBorderBackgroundBrush" Color="#FAFCFF"></SolidColorBrush>
    <SolidColorBrush x:Key="gadgetConfigBackground" Color="#6C9DC6"></SolidColorBrush>
    <SolidColorBrush x:Key="lineListRowHighlightBrush" Color="#4F81BD"></SolidColorBrush>
    <SolidColorBrush x:Key="frequencyPercentBarBrush" Color="#00A2E8"></SolidColorBrush>

    <SolidColorBrush x:Key="cellForeground" Color="#595959"></SolidColorBrush>

    <Thickness x:Key="expanderMargin" Left="6" Top="2" Right="6" Bottom="6"></Thickness>
    <Thickness x:Key="genericElementMargin" Left="6" Top="2" Right="6" Bottom="6"></Thickness>
    <Thickness x:Key="genericTextMargin" Left="4" Top="2" Right="4" Bottom="2"></Thickness>
    <Thickness x:Key="genericTextMarginAlt" Left="4" Top="4" Right="4" Bottom="4"></Thickness>
    <SolidColorBrush x:Key="menuBarBackground" Color="#3696D2"></SolidColorBrush>
    
    <LinearGradientBrush x:Key="goldBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#FDEEB3" Offset="0" />
        <GradientStop Color="#FDE38A" Offset="0.4" />
        <GradientStop Color="#FDE38A" Offset="0.6" />
        <GradientStop Color="#FDFDEB" Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="brushWhiteTransparent" StartPoint="0,0" EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="transparent" Offset="0" />
                <GradientStop Color="#44ffffff" Offset="1" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="redSquare" StartPoint="0,0" EndPoint="1,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="Red" Offset="0" />
                <GradientStop Color="Tomato" Offset="1" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="greenSquare" StartPoint="0,0" EndPoint="1,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="DarkGreen" Offset="1" />
                <GradientStop Color="ForestGreen" Offset="0" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="orangeSquare" StartPoint="0,0" EndPoint="1,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="Orange" Offset="1" />
                <GradientStop Color="DarkOrange" Offset="0" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="yellowSquare" StartPoint="1,0" EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="Yellow" Offset="1" />
                <GradientStop Color="Gold" Offset="0" />
            </GradientStopCollection>
        </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>

    <Style x:Key="configGroupBorderStyle" TargetType="Border">
        <Setter Property="Padding" Value="5,5,5,5" />
        <Setter Property="Margin" Value="0,2,0,2" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="{StaticResource gadgetConfigBackground}" />
        <Setter Property="Background" Value="#F4F8FB" />
    </Style>

    <Style x:Key="twoByTwoSingleTableTextBlockStyle" TargetType="TextBlock">
        <Setter Property="Margin" Value="6,2,6,2"></Setter>        
    </Style>

    <Style x:Key="swapValuesRectangle" TargetType="Rectangle">
        <Setter Property="Fill" Value="SteelBlue"/>
        <Setter Property="Stroke" Value="{StaticResource brushWhiteTransparent}"/>
    </Style>

    <Style x:Key="swapValuesRectangleHover" TargetType="Rectangle">
        <Setter Property="Fill" Value="LightSteelBlue"/>
        <Setter Property="Stroke" Value="{StaticResource brushWhiteTransparent}"/>
    </Style>

    <Style x:Key="percentRectangle" TargetType="Rectangle">
        <Setter Property="Fill" Value="Crimson"/>
        <Setter Property="Stroke" Value="{StaticResource brushWhiteTransparent}"/>
    </Style>

    <Style x:Key="percentRectangleHover" TargetType="Rectangle">
        <Setter Property="Fill" Value="Red"/>
        <Setter Property="Stroke" Value="{StaticResource brushWhiteTransparent}"/>
    </Style>

    <Style x:Key="gadgetWaitPanelStyle" TargetType="{x:Type Controls:GadgetWaitPanel}">
        <!-- HorizontalAlignment="Center" Margin="10" Width="300" Height="140" VerticalAlignment="Top" -->
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Margin" Value="10" />
        <Setter Property="Width" Value="300" />
        <Setter Property="Height" Value="220" />
        <Setter Property="VerticalAlignment" Value="Top" />        
    </Style>
    
    <Style x:Key="rectangleConfigOuter" TargetType="Rectangle">
        <Setter Property="Margin" Value="0,-1,0,0"></Setter>
        <Setter Property="RadiusX" Value="3"></Setter>
        <Setter Property="RadiusY" Value="3"></Setter>
        <Setter Property="Fill" Value="{StaticResource gadgetConfigBackground}"></Setter>
    </Style>
    
    <Style x:Key="rectangleConfigInner" TargetType="Rectangle">        
        <Setter Property="Margin" Value="5"></Setter>
        <Setter Property="RadiusX" Value="2"></Setter>
        <Setter Property="RadiusY" Value="2"></Setter>
        <Setter Property="Fill" Value="{StaticResource gadgetBackgroundBrush}"></Setter>
    </Style>
    
    <DropShadowEffect x:Key="shadowEffect" BlurRadius="6" Color="Black" Direction="315" Opacity=".7" RenderingBias="Performance" ShadowDepth="4" />    
    
    <LinearGradientBrush x:Key="bluePurpleGradient" StartPoint="0,0" EndPoint="1,1">
        <GradientStop Color="#3696D2" Offset="0.0" />
        <GradientStop Color="#507ABE" Offset="0.5" />
        <GradientStop Color="#84379B" Offset="1.0" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="blueGradient" StartPoint="0,0" EndPoint="1,1">
        <GradientStop Color="#3696D2" Offset="0.0" />        
        <GradientStop Color="#507ABE" Offset="1.0" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="blueGradientVertical" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#3696D2" Offset="0.0" />
        <GradientStop Color="#2D8DC8" Offset="1.0" />
    </LinearGradientBrush>

    <PathGeometry x:Key="pathGeometryDocumentIcon" FillRule="Nonzero" Figures="M56.003,0L0,0 0,100 78.067,100 78.067,22.064 56.003,0z M57.027,5.967L72.723,21.663 57.027,21.663 57.027,5.967z M3.495,96.505L3.495,3.495 53.531,3.495 53.531,21.662 53.531,23.41 53.531,25.158 74.572,25.158 74.572,96.505 3.495,96.505z" />
    
    <Style x:Key="gadgetScrollViewer" TargetType="ScrollViewer">
        <Setter Property="Margin" Value="{StaticResource genericElementMargin}"></Setter>
        <Setter Property="HorizontalAlignment" Value="Left"></Setter>
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"></Setter>
    </Style>
   
    <Style TargetType="Border" x:Key="recentDataHighlightBorderStyle">
        <Setter Property="Background" Value="Transparent"></Setter>
        <Setter Property="BorderBrush" Value="Transparent"></Setter>
        <Setter Property="Opacity" Value="1"></Setter>
        <Setter Property="CornerRadius" Value="4"></Setter>
        <Setter Property="Margin" Value="-3"></Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Background" Value="{StaticResource goldBackgroundBrush}"></Setter>
                <Setter Property="BorderBrush" Value="Goldenrod"></Setter>
                <Setter Property="BorderThickness" Value="1"></Setter>
                <Setter Property="Visibility" Value="Visible"></Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    
    <Style TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="Global User Interface" />
    </Style>

    <Style x:Key="statusStripStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Margin" Value="3, 3, 3, 3" />
        <Setter Property="FontSize" Value="11" />
        <Setter Property="FontFamily" Value="Global User Interface" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <SolidColorBrush x:Key="textDarkGray" Color="#3B3B3B" ></SolidColorBrush>

    <Style x:Key="gadgetBaseStyle" TargetType="EpiDashboard:GadgetBase">
        <!--<Setter Property="Background" Value="{StaticResource gadgetBackgroundBrush}"></Setter>-->
        <Setter Property="FontFamily" Value="Global User Interface"></Setter>
    </Style>

    <Style x:Key="shadowRectangle" TargetType="Rectangle" >
        <!--<Setter Property="Fill" Value="{StaticResource gadgetBackgroundBrush}"/>
        <Setter Property="Effect" Value="{StaticResource shadowEffect}"/>-->
    </Style>

    <Style x:Key="shadowRectangleWhite" TargetType="Rectangle" >
        <Setter Property="Fill" Value="White"/>
        <Setter Property="Effect" Value="{StaticResource shadowEffect}"/>
    </Style>

    <Style x:Key="mainGadgetBorder" TargetType="Border">
        <Setter Property="CornerRadius" Value="2"></Setter>
        <Setter Property="Padding" Value="0"></Setter>
        <Setter Property="BorderThickness" Value="1"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource gadgetBorderBrush}"></Setter>
        <Setter Property="Background" Value="{StaticResource gadgetBorderBackgroundBrush}"></Setter>
        <!--<Style.Triggers>            
            <EventTrigger RoutedEvent="Border.MouseEnter">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation                
                            Storyboard.TargetProperty="Background.Opacity"
                            From="0"
                            To="1" 
                            Duration="0:0:0.2" />
                    </Storyboard>
                </BeginStoryboard>

                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation                
                            Storyboard.TargetProperty="BorderBrush.Opacity"
                            From="0"
                            To="1" 
                            Duration="0:0:0.2">
                        </DoubleAnimation>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>

            <EventTrigger RoutedEvent="Border.MouseLeave">
                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation                
                            Storyboard.TargetProperty="Background.Opacity"
                            From="1"
                            To="0" 
                            Duration="0:0:0.3" />
                    </Storyboard>
                </BeginStoryboard>

                <BeginStoryboard>
                    <Storyboard>
                        <DoubleAnimation                
                            Storyboard.TargetProperty="BorderBrush.Opacity"
                            From="1"
                            To="0" 
                            Duration="0:0:0.3" />
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Style.Triggers>-->
    </Style>

    <Style x:Key="mainReportGadgetBorderOn" TargetType="Border">
        <Setter Property="CornerRadius" Value="2"></Setter>
        <Setter Property="Padding" Value="0"></Setter>
        <Setter Property="BorderThickness" Value="1"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource gadgetBorderBrush}"></Setter>
        <Setter Property="Background" Value="{StaticResource gadgetBorderBackgroundBrush}"></Setter>
    </Style>

    <Style x:Key="mainReportGadgetBorderOff" TargetType="Border">
        <Setter Property="CornerRadius" Value="2"></Setter>
        <Setter Property="Padding" Value="0"></Setter>
        <Setter Property="BorderThickness" Value="1"></Setter>
        <Setter Property="BorderBrush" Value="Transparent"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
    </Style>

    <Style x:Key="filterStringText" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="WrapWithOverflow"></Setter>
        <Setter Property="HorizontalAlignment" Value="Left"></Setter>
        <Setter Property="Foreground" Value="Gray"></Setter>
        <Setter Property="Margin" Value="5,0,4,5"></Setter>
        <Setter Property="FontFamily" Value="Global User Interface"></Setter>
    </Style>
    
    <Style x:Key="genericOutputGrid" TargetType="Grid">
        <Setter Property="SnapsToDevicePixels" Value="True"></Setter>
        <Setter Property="Visibility" Value="Collapsed"></Setter>
        <Setter Property="Margin" Value="0"></Setter>
        <Setter Property="HorizontalAlignment" Value="Center"></Setter>
        <Setter Property="Background" Value="White"></Setter>
    </Style>

    <Style x:Key="genericOutputGridBorder" TargetType="Border">
        <Setter Property="BorderThickness" Value="0,0,0,0"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource outputBorderBrush}"></Setter>        
    </Style>

    <Style x:Key="genericOutputGridBorderWithMargins" TargetType="Border">
        <Setter Property="BorderThickness" Value="0,0,0,0"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource outputBorderBrush}"></Setter>
        <Setter Property="Margin" Value="6,0,6,6"></Setter>
        <Setter Property="VerticalAlignment" Value="Top"></Setter>
    </Style>

    <Style x:Key="genericOutputExpanderText" TargetType="TextBlock">
        <Setter Property="FontWeight" Value="Bold"></Setter>
        <Setter Property="FontFamily" Value="Global User Interface"></Setter>
        <Setter Property="FontSize" Value="15"></Setter>
    </Style>
    
    <Style x:Key="gridCellRectangle" TargetType="Rectangle">
        <Setter Property="Fill" Value="White"></Setter>
    </Style>

    <Style x:Key="gridHeaderCellRectangle" TargetType="Rectangle">
        <Setter Property="Fill" Value="#4F81BD"></Setter>
        <!--<Setter Property="Fill" Value="#7E98B7"></Setter>-->
        <!--<Setter Property="Fill" Value="#88A2C1"></Setter>-->        
    </Style>

    <Style x:Key="gridCellBorder" TargetType="Border">
        <Setter Property="BorderThickness" Value="0, 0, 1, 1"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource cellBorderBrush}"></Setter>
        <Setter Property="IsHitTestVisible" Value="False"></Setter>
    </Style>

    <Style x:Key="gridHeaderCellBorder" TargetType="Border">
        <Setter Property="BorderThickness" Value="0, 0, 1, 1"></Setter>
        <Setter Property="BorderBrush" Value="{StaticResource headerCellBorderBrush}"></Setter>
        <Setter Property="IsHitTestVisible" Value="False"></Setter>
    </Style>

    <Style x:Key="columnHeadingText" TargetType="TextBlock">
        <Setter Property="VerticalAlignment" Value="Center"></Setter>
        <Setter Property="HorizontalAlignment" Value="Center"></Setter>
        <Setter Property="FontFamily" Value="Global User Interface"></Setter>
        <Setter Property="FontWeight" Value="Bold"></Setter>
        <Setter Property="Foreground" Value="{StaticResource columnHeaderForegroundBrush}"></Setter>
        <Setter Property="Margin" Value="4,0,4,0"></Setter>
    </Style>
    
    <DropShadowEffect x:Key="dashedLineshadowEffect" BlurRadius="4" Color="Black" Direction="315" Opacity=".4" RenderingBias="Performance" ShadowDepth="1" />

    <Style x:Key="RotateAxisAberrationStyle"
            TargetType="toolkit:AxisLabel">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="toolkit:AxisLabel">
                    <TextBlock Text="{TemplateBinding FormattedContent}" Padding="5">
                        <TextBlock.LayoutTransform>
                            <RotateTransform Angle="-90"/>
                        </TextBlock.LayoutTransform>
                    </TextBlock>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="DataPointAberrationStyle" TargetType="toolkit:ScatterDataPoint">
        <Setter Property="Background" Value="Red"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="#FF686868"/>
        <Setter Property="Width" Value="15" />
        <Setter Property="Height" Value="15" />
        <!--<Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="toolkit:ScatterDataPoint">
                    <Grid x:Name="Root" Opacity="0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MouseOverHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.1"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectionHighlight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.185"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="RevealStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.5"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Shown">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Hidden">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ToolTipService.ToolTip>
                            <ContentControl Content="{TemplateBinding FormattedDependentValue}"/>
                        </ToolTipService.ToolTip>
                        <Path Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z "/>
                        <Path x:Name="MouseOverHighlight" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Stroke="{x:Null}" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z  " Opacity="0" Fill="White" />
                        <Path x:Name="SelectionHighlight" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Stroke="{x:Null}" Data="F1 M 0,50L 50,0 100,50 50,100L 0,50 Z " Fill="Red" Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>-->
        <Setter Property="Effect" Value="{StaticResource dashedLineshadowEffect}"/>
    </Style>    
    
    <Style x:Key="GooglePolylineAberrationStyle" TargetType="Polyline">
        <Setter Property="StrokeThickness" Value="3"/>
        <Setter Property="StrokeDashArray" Value="2 2"/>
        <Setter Property="Effect" Value="{StaticResource dashedLineshadowEffect}"/>        
    </Style>
    <Style x:Key="GoogleDataPointAberrationStyle" TargetType="toolkit:LineDataPoint">
        <Setter Property="Background" Value="Orange"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="BorderBrush" Value="Orange"/>
        <Setter Property="Width" Value="0" />
        <Setter Property="Height" Value="0" />
    </Style>



    

</ResourceDictionary>  
    
